import Vue from 'vue'
import App from './App.vue'
// 引入重置样式reset.less
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

Vue.config.productionTip = false



// 引入路由
import VueRouter from "vue-router"
// 注册全局组件
Vue.use(VueRouter)
// 创建路由规则数组
const routes =[
  {
    path:'/',
    redirect:"/homePage"
  },
  {
    path:'/homePage', //首页
    component:()=>import('./views/homePage.vue'),
    name:'homePage',
  },
  {
    path:'/Economics', //房产经济
    component:()=>import('./views/Economics.vue'),
    name:'Economics'
  },
  {
    path:'/Classification', //地产分类
    component:()=>import('./views/Classification.vue'),
    name:'Classification'
  },
  {
    path:'/About', //关于我们
    component:()=>import('./views/About.vue'),
    name:'About'
  },
]
// 用路由规则生成路由对象
const router =new VueRouter ({
  routes:routes,
  mode:'history'
})

Vue.config.productionTip = false

new Vue({
  router:router,
  render: h => h(App),
}).$mount('#app')
